<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8"/>
    <meta name="msapplication-tap-highlight" content="no"/>
    <meta name="viewport" content="user-scalable=no, initial-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi"/>
    <title>Testing IndexedDB Shim</title>

    <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
    <link rel="stylesheet" href="../test-support/mocha/mocha.css"/>
    <link rel="stylesheet" href="styles.css"/>
  </head>
  <body>
    <div id="mocha">
      <ul id="supports">
        <li id="supports-websql" class="test">WebSql</li>
        <li id="supports-indexeddb" class="test">IndexedDB</li>
        <li id="supports-mozindexeddb" class="test">mozIndexedDB</li>
        <li id="supports-webkitindexeddb" class="test">webkitIndexedDB</li>
        <li id="supports-msindexeddb" class="test">msIndexedDB</li>
      </ul>
      <div id="options">
        <a id="use-native" href="?useShim=false">Switch to Native IndexedDB</a>
        <a id="use-shim" href="?useShim=true">Switch to IndexedDBShim</a>
      </div>
      <div id="choke-warning">
        <h1>Warning!</h1>
        <ul>
          <li class="test fail">
            <h2>
              This browser has trouble running the <strong>hundreds</strong> of tests on this page.
              If you get test failures, then try running each test suite separately, by clicking the test suite's title.
            </h2>
          </li>
        </ul>
      </div>
    </div>

    <script src="../test-support/source-map-support/browser-source-map-support.js"></script>
    <script>
    /* globals sourceMapSupport */
    sourceMapSupport.install();
    </script>

    <!-- Test Environment -->
    <script src="../test-support/mocha/mocha.js"></script>
    <script src="../test-support/chai/chai.js"></script>
    <script src="../test-support/sinon/pkg/sinon-no-sourcemaps.js"></script>
    <script src="test-environment.js"></script>
    <script src="test-utils.js"></script>

    <!-- IndexedDBShim -->
    <script src="../test-support/core-js-bundle/minified.js"></script>

    <script src="../dist/indexeddbshim-noninvasive.js"></script>
    <script>
    /* globals setGlobalVars */
    setGlobalVars(null, {
        addNonIDBGlobals: true
    });
    </script>
    <!--<script src="../src/Init.js"></script>-->
    <!--<script src="../src/util.js"></script>-->
    <!--<script src="../src/polyfill.js"></script>-->
    <!--<script src="../src/Sca.js"></script>-->
    <!--<script src="../src/Key.js"></script>-->
    <!--<script src="../src/Event.js"></script>-->
    <!--<script src="../src/DOMException.js"></script>-->
    <!--<script src="../src/IDBRequest.js"></script>-->
    <!--<script src="../src/IDBKeyRange.js"></script>-->
    <!--<script src="../src/IDBCursor.js"></script>-->
    <!--<script src="../src/IDBIndex.js"></script>-->
    <!--<script src="../src/IDBObjectStore.js"></script>-->
    <!--<script src="../src/IDBTransaction.js"></script>-->
    <!--<script src="../src/IDBDatabase.js"></script>-->
    <!--<script src="../src/IDBFactory.js"></script>-->
    <!--<script src="../src/setGlobalVars.js"></script>-->

    <!-- Unit Tests -->
    <script src="api-spec.js"></script>
    <script src="IDBCursor/delete-spec.js"></script>
    <script src="IDBCursor/update-spec.js"></script>
    <script src="IDBDatabase/close-spec.js"></script>
    <script src="IDBDatabase/createObjectStore-spec.js"></script>
    <script src="IDBDatabase/deleteObjectStore-spec.js"></script>
    <script src="IDBDatabase/transaction-spec.js"></script>
    <script src="IDBFactory/cmp-spec.js"></script>
    <script src="IDBFactory/databases-spec.js"></script>
    <script src="IDBFactory/deleteDatabase-spec.js"></script>
    <script src="IDBFactory/open-spec.js"></script>
    <script src="IDBIndex/count-spec.js"></script>
    <script src="IDBIndex/get-spec.js"></script>
    <script src="IDBIndex/getKey-spec.js"></script>
    <script src="IDBIndex/openCursor-spec.js"></script>
    <script src="IDBIndex/openKeyCursor-spec.js"></script>
    <script src="IDBKeyRange/includes-spec.js"></script>
    <script src="IDBObjectStore/add-put-spec.js"></script>
    <script src="IDBObjectStore/add-spec.js"></script>
    <script src="IDBObjectStore/clear-spec.js"></script>
    <script src="IDBObjectStore/count-spec.js"></script>
    <script src="IDBObjectStore/createIndex-spec.js"></script>
    <script src="IDBObjectStore/delete-spec.js"></script>
    <script src="IDBObjectStore/deleteIndex-spec.js"></script>
    <script src="IDBObjectStore/get-spec.js"></script>
    <script src="IDBObjectStore/index-spec.js"></script>
    <script src="IDBObjectStore/indexNames-spec.js"></script>
    <script src="IDBObjectStore/openKeyCursor-spec.js"></script>
    <script src="IDBObjectStore/put-spec.js"></script>
    <script src="IDBTransaction/events-spec.js"></script>
    <script src="IDBTransaction/objectStore-spec.js"></script>

    <script>
      /* eslint-env mocha */
      mocha.run();
    </script>
  </body>
</html>
